package com.site.util.base.service;

import com.site.util.exception.ApplicationException;
import com.site.util.exception.SystemException;

/**
 * service接口
 * 所有Service接口都必须继承此接口，
 * 系统中只对execute方法添加了事务处理，
 * 如果需要事务处理的操作都必须调用此方法。
 */
public interface BaseService {
	
	public static final String COMMAND_SAVE = "save";
	
	public static final String COMMAND_SAVE_LIST = "saveList";
	
	public static final String COMMAND_UPDATE_LIST = "updateList";
	
	public static final String COMMAND_UPDATE = "update";
	
	public static final String COMMAND_DELETE = "delete";
	
	public static final String COMMAND_DELETE_ALL = "deleteAll";
	
	public static final String COMMAND_SAVE_ALL = "saveAll";
	
	public static final String COMMAND_UPDATE_ALL = "updateAll";
	
	public static final String COMMAND_MARKDEL_ALL = "markDeleteAll";
	//启用
	public static final String COMMAND_MARKENA_ALL = "markEnableAll";
	//停用
	public static final String COMMAND_MARKDIS_ALL = "markDisableAll";
	//解锁
	public static final String COMMAND_LOCK_ALL = "lockAll";
	//解锁
	public static final String COMMAND_UNLOCK_ALL = "unLockAll";
	//增加
	public static final String COMMAND_ADD = "add";
	//减少
	public static final String COMMAND_REDUCE = "reduce";	
	//增加
	public static final String COMMAND_ADD_STOCK = "addstock";
	//减少
	public static final String COMMAND_REDUCE_STOCK = "reducestock";
	//增加残次品库存
	public static final String COMMAND_ADD_DEFECTIVE_STOCK = "addDefectiveStock";
	//减少残次品库存
	public static final String COMMAND_DELETE_DEFECTIVE_STOCK = "deleteDefectiveStock";
	//提货单完成
	public static final String COMMAND_DELIVERY_FINISHED = "deliveryFinished";
	//提货单取消
	public static final String COMMAND_DELIVERY_CANCELED = "deliveryCanceled";
	/**
	 * 审核
	 */
	public static final String COMMAND_FREE_ALL = "commandFreeAll";
	/**
	 * 所有Service接口都必须继承此接口，
	 * 系统中只对execute方法添加了事务处理，
	 * 如果需要事务处理的操作都必须调用此方法。
	 * @param obj 该对象一般为业务数据对象po,特殊情况下可以传其它对象传值
	 * @param command 操作命令，在service实现类中通过command判断进行什么样的操作
	 * @return Object 可以返回所有对象
	 * @throws SystemException 系统异常
	 * @throws ApplicationException 应用异常
	 */
	public Object execute(Object obj,String command) throws SystemException,ApplicationException;
}
